<template>
    <div>
        关于页
        <p>{{ counterStore.count }}</p>
        <p><button @click="counterStore.increment()">计数器+1</button></p>
        <p><button @click="resetCounter()">重置计数器</button></p>
        <p><button @click="counterStore.$patch({count:30})">变更计数器</button></p>
    </div>
</template>

<script>
import { mapStores } from 'pinia';
import { useCounterStore } from '../stores/counter';

export default {
    methods: {
        resetCounter() {
            this.counterStore.$reset();
        }
    },
    computed: {
        ...mapStores(useCounterStore),
    }
}
</script>

<style scoped>

</style>